1. Field of the Invention
The present invention generally relates to a computer method and apparatus for modifying the allocated memory space assigned to a program running under control of an operating system. More particularly, the invention relates to a computer method and apparatus for expanding the memory space presently allocated to a program running under WINDOWS.RTM. 95 or NT (registered Trademark of Microsoft Corporation)operating systems while requiring a zero footprint in programs running under WINDOWS.RTM. 95 or NT operating systems, or their like.
2. Description of the Related Art
There are instances, such as in a debugging program, that it is desirable to add instructions to a program running under WINDOWS.RTM. 95 and NT operating systems, or their like. However under the architecture of WINDOWS.RTM. 95 and NT operating systems, or their like, a program is allocated memory space in memory referred to as a virtual memory. Further to allow multiprocessing of programs resources are allocated to a program which are referred to as a virtual processor. The virtual processor includes a series of programmable registers, including but not limited to programmable register commonly referred to as registers eip, esp, eax, ebx and ecx which are used by the operating system in executing the program. The state of the programmable registers is commonly referred to as the context of the program.
WINDOWS.RTM. 95 and WINDOWS.RTM. NT operating systems, or their like, includes a "Just In Time" (JIT) debugging facility which detects fatal error occurring in programs presently being processed. Upon the occurrence of a fatal error JIT will stop the program and collect data about the status of the program and the virtual processor running the program experiencing the fatal error (hereinafter referred to as a target program). The user has no choice but to exit the target program thereby losing any updated data that had not previously been stored.
There are debugging programs designed to prevent errors within WINDOWS.RTM. 95 and WINDOWS.RTM. NT programs from causing the target program from being immediately terminated. These debugging programs achieve this end by intercepting all errors and exceptions within the running programs, which in turn requires code associated with the debugging program (a debugging footprint) to be loaded into all programs before the programs are executed. The loading of the code associated with the debugging programs has been accomplished by the use of virtual device drivers (Vxd) and by the use of system hooks. Although the hooks pose the greatest risk, debugging programs have the drawback that they must load code into every program and the code might actually cause malfunctions in the programs that they are supposed to protect.
It is known that additional code can be loaded into a program by the library function (LoadLibrary) which implicitly expands the program's virtual memory. However the library function requires interaction with the program and where the program has incurred a fatal error, the use of the library function poses unknown risk one of which could be a system shutdown destroying not only the data of the crashed program but of all other program being run under the operating system.